home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 42 / Amiga Format AFCD42 (Issue 126, Aug 1999).iso / -serious- / programming / c / bitmap24 / bitmap24.doc < prev    next >
Encoding:
Text File  |  1999-05-17  |  22.9 KB  |  1,019 lines

  1. TABLE OF CONTENTS
  2.  
  3. BitMap24/---background--
  4. BitMap24/BitMap24
  5. BitMap24/~BitMap24
  6. BitMap24/GetError
  7. BitMap24/HasError
  8. BitMap24/ResetError
  9. BitMap24/GetErrorStr
  10. BitMap24/GetWidth
  11. BitMap24/GetHeight
  12. BitMap24/GetRealWidth
  13. BitMap24/GetRealHeight
  14. BitMap24/GetColour
  15. BitMap24/GetRed
  16. BitMap24/GetGreen
  17. BitMap24/GetBlue
  18. BitMap24/SetColour
  19. BitMap24/GetWidthFast
  20. BitMap24/GetHeightFast
  21. BitMap24/GetRealWidthFast
  22. BitMap24/GetRealHeightFast
  23. BitMap24/GetColourFast
  24. BitMap24/GetRedFast
  25. BitMap24/GetGreenFast
  26. BitMap24/GetBlueFast
  27. BitMap24/SetColourFast
  28. BitMap24/WriteBitMap
  29. BitMap24/ReadBitMap
  30. BitMap24/GetBitMap
  31. BitMap24/SetSize
  32. BitMap24/BoundsCheck
  33.  
  34.  
  35. BitMap24/--background--                               BitMap24/--background--
  36.  
  37.    NAME
  38.         BitMap24 - A 24 bit bitmap class with IFF loading and saving
  39.  
  40.    PURPOSE
  41.         This document describes the BitMap24 class, which handles 24 bit
  42.         bitmap data.
  43.  
  44.         The class can be roughly split in two parts. There are the normal
  45.         methods, which include error checking for out of bound data, and the
  46.         fast inline versions with no error checking.
  47.  
  48.         Bitmaps can also be saved in 24 bit IFF format, as well as loaded.
  49.         Note that for loading, the bitmap must also be 24 bit. Loading and
  50.         saving is implemented using IFFParse library routines.
  51.  
  52.    LICENSE
  53.         This document is Copyright (C) 1999 Jarno van der Linden
  54.         jarno@kcbbs.gen.nz
  55.  
  56.            Permission is granted to make and distribute verbatim copies of
  57.         this manual provided the copyright notice and this permission notice
  58.         are preserved on all copies.
  59.  
  60.            Permission is granted to copy and distribute modified versions of
  61.         this manual under the conditions for verbatim copying, provided also
  62.         that the entire resulting derived work is distributed under the terms
  63.         of a permission notice identical to this one.
  64.  
  65.            Permission is granted to copy and distribute translations of this
  66.         manual into another language, under the above conditions for modified
  67.         versions.
  68.  
  69.  
  70.         The BitMap24 library is Copyright (C) 1999  Jarno van der Linden
  71.         jarno@kcbbs.gen.nz
  72.  
  73.         This library is free software; you can redistribute it and/or
  74.         modify it under the terms of the GNU Library General Public
  75.         License as published by the Free Software Foundation; either
  76.         version 2 of the License, or (at your option) any later version.
  77.  
  78.         This library is distributed in the hope that it will be useful,
  79.         but WITHOUT ANY WARRANTY; without even the implied warranty of
  80.         MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  81.         Library General Public License for more details.
  82.  
  83.         You should have received a copy of the GNU Library General Public
  84.         License along with this library; if not, write to the
  85.         Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  86.         Cambridge, MA 02139, USA.
  87.  
  88.  
  89.  
  90. BitMap24/BitMap24                                           BitMap24/BitMap24
  91.  
  92.    NAME
  93.         BitMap24 - Class constructor
  94.  
  95.    SYNOPSIS
  96.         BitMap24()
  97.         
  98.         BitMap24(void);
  99.         
  100.         BitMap24(filename)
  101.         
  102.         BitMap24(char *);
  103.  
  104.    FUNCTION
  105.         A new instance of the class is created. The width and height can be
  106.         anything. Internally, the bitmap will be enlarged to a multiple of
  107.         16 in width. The bitmap will be zeroed.
  108.         
  109.         The first form creates a bitmap object. It must be initialized by
  110.         setting a size with SetSize(), or loading a bitmap from a file.
  111.         The second form attempts to load a bitmap from a 24 bit ILBM IFF
  112.         file.
  113.  
  114.    INPUTS
  115.         filename - Name of a 24 bit ILBM IFF file to read bitmap from
  116.  
  117.    RESULTS
  118.         A very cute bouncy healthy bitmap object
  119.  
  120.    ERRORS SET
  121.         If the bitmap fails to allocate, BITMAP24_ERROR_NOBITMAP will be set.
  122.         If the bitmap is read from a file, the errors listed for the
  123.         ReadBitMap() method also apply.
  124.  
  125.    BUGS
  126.         Strange things might happen if width or height is set to zero
  127.  
  128.    SEE ALSO
  129.         ~BitMap24()
  130.  
  131.  
  132. BitMap24/~BitMap24                                         BitMap24/~BitMap24
  133.  
  134.    NAME
  135.         ~BitMap24 - Class destructor
  136.  
  137.    SYNOPSIS
  138.         ~BitMap24()
  139.  
  140.         ~BitMap24(void);
  141.  
  142.    FUNCTION
  143.         The instance of the class is deleted. Any memory allocated for the
  144.         object will be deleted.
  145.  
  146.    INPUTS
  147.         None
  148.  
  149.    RESULTS
  150.         The complete and utter destruction
  151.  
  152.    ERRORS SET
  153.         None
  154.  
  155.    BUGS
  156.         None
  157.  
  158.    SEE ALSO
  159.         BitMap24()
  160.  
  161.  
  162. BitMap24/GetError                                           BitMap24/GetError
  163.  
  164.    NAME
  165.         GetError - Obtain the error code currently set
  166.  
  167.    SYNOPSIS
  168.         result = GetError()
  169.  
  170.         int GetError(void);
  171.  
  172.    FUNCTION
  173.         Some method calls may set an error code of something bad happens.
  174.         This method returns the currently set error code. Note that error
  175.         codes don't accumulate, but are overwritten by subsequent errors.
  176.  
  177.    INPUTS
  178.         None
  179.  
  180.    RESULTS
  181.         result - A (non-)error code. Currently defined are:
  182.              BITMAP24_ERROR_NONE         : No error
  183.              BITMAP24_ERROR_NOBITMAP     : BitMap couldn't be allocated
  184.              BITMAP24_ERROR_FILEOPEN     : Error opening output file
  185.              BITMAP24_ERROR_OUTOFBOUNDS  : Out of bounds coordinate used
  186.              BITMAP24_ERROR_ALLOCFAILURE : Memory allocation failure
  187.              BITMAP24_ERROR_FILEFORMAT   : File format not what expected
  188.              BITMAP24_ERROR_PARSE        : Error during parsing
  189.              BITMAP24_ERROR_PREPARSE     : Error during parsing
  190.  
  191.    ERRORS SET
  192.         None
  193.  
  194.    BUGS
  195.         None
  196.  
  197.    SEE ALSO
  198.         HasError(), GetErrorStr(), ResetError()
  199.  
  200.  
  201. BitMap24/HasError                                           BitMap24/HasError
  202.  
  203.    NAME
  204.         HasError - Checks if an error is set
  205.  
  206.    SYNOPSIS
  207.         result = HasError()
  208.  
  209.         BOOL HasError(void);
  210.  
  211.    FUNCTION
  212.         Checks to see if an error has occured.
  213.  
  214.    INPUTS
  215.         None
  216.  
  217.    RESULTS
  218.         result - TRUE if there is an error, FALSE otherwise
  219.  
  220.    ERRORS SET
  221.         None
  222.  
  223.    BUGS
  224.         None
  225.  
  226.    SEE ALSO
  227.         GetError(), GetErrorStr(), ResetError()
  228.  
  229.  
  230. BitMap24/ResetError                                       BitMap24/ResetError
  231.  
  232.    NAME
  233.         ResetError - Retrieve current error value and reset
  234.  
  235.    SYNOPSIS
  236.         result = ResetError()
  237.  
  238.         int ResetError(void);
  239.  
  240.    FUNCTION
  241.         This is similar to GetError(), except that the internal error
  242.         indicator is also reset to BITMAP24_ERROR_NONE.
  243.  
  244.    INPUTS
  245.         None
  246.  
  247.    RESULTS
  248.         result - The error code set at the time of the call
  249.  
  250.    ERRORS SET
  251.         Current error is always set to BITMAP24_ERROR_NONE
  252.  
  253.    BUGS
  254.         None
  255.  
  256.    SEE ALSO
  257.         GetError(), HasError(), GetErrorStr()
  258.  
  259.  
  260. BitMap24/GetErrorStr                                     BitMap24/GetErrorStr
  261.  
  262.    NAME
  263.         GetErrorStr - Obtain a string explaining an error
  264.  
  265.    SYNOPSIS
  266.         GetErrorStr(error)
  267.  
  268.         char *GetErrorStr(int);
  269.  
  270.         GetErrorStr()
  271.  
  272.         char *GetErrorStr(void);
  273.  
  274.    FUNCTION
  275.         The first form results in a pointer to a string giving a short
  276.         explanation of the given error code.
  277.         The second form does the same thing, but using the currently set
  278.         error code.
  279.  
  280.    INPUTS
  281.         error - The error code for which to get an explanation. See
  282.                 GetError() for a list of valid error codes.
  283.  
  284.    RESULTS
  285.         result - String explaining the error
  286.  
  287.    ERRORS SET
  288.         None
  289.  
  290.    BUGS
  291.         None
  292.  
  293.    SEE ALSO
  294.         GetError(), ResetError()
  295.  
  296.  
  297. BitMap24/GetWidth                                           BitMap24/GetWidth
  298.  
  299.    NAME
  300.         GetWidth - Obtain BitMap width
  301.  
  302.    SYNOPSIS
  303.         result = GetWidth()
  304.  
  305.         UWORD GetWidth(void);
  306.  
  307.    FUNCTION
  308.         Gets the width of the bitmap. This is the actual width with which the
  309.         bitmap was allocated. Generally it is different from the width passed
  310.         in the constructor.
  311.  
  312.    INPUTS
  313.         None
  314.  
  315.    RESULTS
  316.         result - The width of the bitmap
  317.  
  318.    ERRORS SET
  319.         None
  320.  
  321.    BUGS
  322.         None
  323.  
  324.    SEE ALSO
  325.         GetWidthFast(), GetRealWidth(), GetHeight()
  326.  
  327.  
  328. BitMap24/GetHeight                                         BitMap24/GetHeight
  329.  
  330.    NAME
  331.         GetHeight - Obtain BitMap height
  332.  
  333.    SYNOPSIS
  334.         result = GetHeight()
  335.  
  336.         UWORD GetHeight(void);
  337.  
  338.    FUNCTION
  339.         Gets the height of the bitmap. This is the actual height with which
  340.         the bitmap was allocated. Generally it is different from the height
  341.         passed in the constructor.
  342.  
  343.    INPUTS
  344.         None
  345.  
  346.    RESULTS
  347.         result - The height of the bitmap
  348.  
  349.    ERRORS SET
  350.         None
  351.  
  352.    BUGS
  353.         None
  354.  
  355.    SEE ALSO
  356.         GetHeightFast(), GetRealHeight(), GetWidth()
  357.  
  358.  
  359. BitMap24/GetRealWidth                                   BitMap24/GetRealWidth
  360.  
  361.    NAME
  362.         GetRealWidth - Obtain requested BitMap width
  363.  
  364.    SYNOPSIS
  365.         result = GetRealWidth()
  366.  
  367.         UWORD GetRealWidth(void);
  368.  
  369.    FUNCTION
  370.         Gets the width of the bitmap as requested in the constructor. This is
  371.         the width on which bounds checking is done.
  372.  
  373.    INPUTS
  374.         None
  375.  
  376.    RESULTS
  377.         result - The real width of the bitmap
  378.  
  379.    ERRORS SET
  380.         None
  381.  
  382.    BUGS
  383.         None
  384.  
  385.    SEE ALSO
  386.         GetRealWidthFast(). GetWidth(), GetRealHeight()
  387.  
  388.  
  389. BitMap24/GetRealHeight                                 BitMap24/GetRealHeight
  390.  
  391.    NAME
  392.         GetRealHeight - Obtain requested BitMap height
  393.  
  394.    SYNOPSIS
  395.         result = GetRealHeight()
  396.  
  397.         UWORD GetRealHeight(void);
  398.  
  399.    FUNCTION
  400.         Gets the height of the bitmap as requested in the constructor. This
  401.         is the height on which bounds checking is done.
  402.  
  403.    INPUTS
  404.         None
  405.  
  406.    RESULTS
  407.         result - The real height of the bitmap
  408.  
  409.    ERRORS SET
  410.         None
  411.  
  412.    BUGS
  413.         None
  414.  
  415.    SEE ALSO
  416.         GetRealHeightFast(), GetHeight(), GetRealWidth()
  417.  
  418.  
  419. BitMap24/GetColour                                         BitMap24/GetColour
  420.  
  421.    NAME
  422.         GetColour - Obtain the colour at a point in the bitmap
  423.  
  424.    SYNOPSIS
  425.         GetColour(colour, x, y)
  426.  
  427.         void GetColour(Colour *, int, int);
  428.  
  429.    FUNCTION
  430.         Gets the colour set at a given point in the bitmap.
  431.  
  432.    INPUTS
  433.         colour - Pointer to memory where the obtained colour can be stored
  434.         x, y - BitMap coordinates from where to obtain the colour
  435.  
  436.    RESULTS
  437.         None
  438.  
  439.    ERRORS SET
  440.         BITMAP24_ERROR_OUTOFBOUNDS if the coordinate is outside the drawable
  441.         area of the bitmap.
  442.  
  443.    BUGS
  444.         None
  445.  
  446.    SEE ALSO
  447.         GetColourFast(), GetRed(), GetGreen(), GetBlue(), SetColour()
  448.  
  449.  
  450. BitMap24/GetRed                                               BitMap24/GetRed
  451.  
  452.    NAME
  453.         GetRed - Obtain the red component at a point in the bitmap
  454.  
  455.    SYNOPSIS
  456.         result = GetRed(x, y)
  457.  
  458.         UBYTE GetRed(int, int);
  459.  
  460.    FUNCTION
  461.         Gets the red component set at a given point in the bitmap.
  462.  
  463.    INPUTS
  464.         x, y - BitMap coordinates from where to obtain the colour
  465.  
  466.    RESULTS
  467.         result - Red component at the given coordinate
  468.  
  469.    ERRORS SET
  470.         BITMAP24_ERROR_OUTOFBOUNDS if the coordinate is outside the drawable
  471.         area of the bitmap.
  472.  
  473.    BUGS
  474.         None
  475.  
  476.    SEE ALSO
  477.         GetRedFast(), GetGreen(), GetBlue(), GetColour()
  478.  
  479.  
  480. BitMap24/GetGreen                                           BitMap24/GetGreen
  481.  
  482.    NAME
  483.         GetGreen - Obtain the green component at a point in the bitmap
  484.  
  485.    SYNOPSIS
  486.         result = GetGreen(x, y)
  487.  
  488.         UBYTE GetGreen(int, int);
  489.  
  490.    FUNCTION
  491.         Gets the green component set at a given point in the bitmap.
  492.  
  493.    INPUTS
  494.         x, y - BitMap coordinates from where to obtain the colour
  495.  
  496.    RESULTS
  497.         result - Green component at the given coordinate
  498.  
  499.    ERRORS SET
  500.         BITMAP24_ERROR_OUTOFBOUNDS if the coordinate is outside the drawable
  501.         area of the bitmap.
  502.  
  503.    BUGS
  504.         None
  505.  
  506.    SEE ALSO
  507.         GetGreenFast(), GetRed(), GetBlue(), GetColour()
  508.  
  509.  
  510. BitMap24/GetBlue                                             BitMap24/GetBlue
  511.  
  512.    NAME
  513.         GetBlue - Obtain the blue component at a point in the bitmap
  514.  
  515.    SYNOPSIS
  516.         result = GetBlue(x, y)
  517.  
  518.         UBYTE GetBlue(int, int);
  519.  
  520.    FUNCTION
  521.         Gets the blue component set at a given point in the bitmap.
  522.  
  523.    INPUTS
  524.         x, y - BitMap coordinates from where to obtain the colour
  525.  
  526.    RESULTS
  527.         result - Blue component at the given coordinate
  528.  
  529.    ERRORS SET
  530.         BITMAP24_ERROR_OUTOFBOUNDS if the coordinate is outside the drawable
  531.         area of the bitmap.
  532.  
  533.    BUGS
  534.         None
  535.  
  536.    SEE ALSO
  537.         GetBlueFast(), GetRed(), GetGreen(), GetColour()
  538.  
  539.  
  540. BitMap24/SetColour                                         BitMap24/SetColour
  541.  
  542.    NAME
  543.         SetColour - Set the colour at a position in the bitmap
  544.  
  545.    SYNOPSIS
  546.         SetColour(r, g, b, x, y)
  547.  
  548.         void SetColour(UBYTE, UBYTE, UBYTE, int, int);
  549.  
  550.         SetColour(colour, x, y)
  551.  
  552.         void SetColour(const Colour &, int, int);
  553.  
  554.    FUNCTION
  555.         Sets the colour at a specific position in the bitmap.
  556.  
  557.    INPUTS
  558.         r, g, b - Colour to set
  559.         colour - Colour to set
  560.         x, y - BitMap coordinates where to colour is to be set
  561.  
  562.    RESULTS
  563.         None
  564.  
  565.    ERRORS SET
  566.         BITMAP24_ERROR_OUTOFBOUNDS if the coordinate is outside the drawable
  567.         area of the bitmap.
  568.  
  569.    BUGS
  570.         None
  571.  
  572.    SEE ALSO
  573.         SetColourFast(), SetRed(), SetGreen(), SetBlue()
  574.  
  575.  
  576. BitMap24/GetWidthFast                                   BitMap24/GetWidthFast
  577.  
  578.    NAME
  579.         GetWidthFast - Obtain BitMap width, inlined
  580.  
  581.    SYNOPSIS
  582.         result = GetWidthFast()
  583.  
  584.         inline UWORD GetWidthFast(void);
  585.  
  586.    FUNCTION
  587.         Inlined version of GetWidth().
  588.  
  589.    INPUTS
  590.         None
  591.  
  592.    RESULTS
  593.         result - The width of the bitmap
  594.  
  595.    ERRORS SET
  596.         None
  597.  
  598.    BUGS
  599.         None
  600.  
  601.    SEE ALSO
  602.         GetWidth(), GetRealWidthFast(), GetHeightFast()
  603.  
  604.  
  605. BitMap24/GetHeightFast                                 BitMap24/GetHeightFast
  606.  
  607.    NAME
  608.         GetHeightFast - Obtain BitMap height, inlined
  609.  
  610.    SYNOPSIS
  611.         result = GetHeightFast()
  612.  
  613.         inline UWORD GetHeightFast(void);
  614.  
  615.    FUNCTION
  616.         Inlined version of GetHeight().
  617.  
  618.    INPUTS
  619.         None
  620.  
  621.    RESULTS
  622.         result - The height of the bitmap
  623.  
  624.    ERRORS SET
  625.         None
  626.  
  627.    BUGS
  628.         None
  629.  
  630.    SEE ALSO
  631.         GetHeight(), GetRealHeightFast(), GetWidthFast()
  632.  
  633.  
  634. BitMap24/GetRealWidthFast                           BitMap24/GetRealWidthFast
  635.  
  636.    NAME
  637.         GetRealWidthFast - Obtain requested BitMap width, inlined
  638.  
  639.    SYNOPSIS
  640.         result = GetRealWidthFast()
  641.  
  642.         inline UWORD GetRealWidthFast(void);
  643.  
  644.    FUNCTION
  645.         Inlined version of GetRealWidth().
  646.  
  647.    INPUTS
  648.         None
  649.  
  650.    RESULTS
  651.         result - The real width of the bitmap
  652.  
  653.    ERRORS SET
  654.         None
  655.  
  656.    BUGS
  657.         None
  658.  
  659.    SEE ALSO
  660.         GetRealWidth(), GetWidthFast(), GetRealHeightFast()
  661.  
  662.  
  663. BitMap24/GetRealHeightFast                         BitMap24/GetRealHeightFast
  664.  
  665.    NAME
  666.         GetRealHeightFast - Obtain requested BitMap height, inlined
  667.  
  668.    SYNOPSIS
  669.         result = GetRealHeightFast()
  670.  
  671.         inline UWORD GetRealHeightFast(void);
  672.  
  673.    FUNCTION
  674.         Inlined version of GetHeightWidth().
  675.  
  676.    INPUTS
  677.         None
  678.  
  679.    RESULTS
  680.         result - The real height of the bitmap
  681.  
  682.    ERRORS SET
  683.         None
  684.  
  685.    BUGS
  686.         None
  687.  
  688.    SEE ALSO
  689.         GetRealHeight, GetHeightFast(), GetRealWidthFast()
  690.  
  691.  
  692. BitMap24/GetColourFast                                 BitMap24/GetColourFast
  693.  
  694.    NAME
  695.         GetColourFast - Obtain the colour at a point in the bitmap, inlined
  696.  
  697.    SYNOPSIS
  698.         GetColourFast(colour, x, y)
  699.  
  700.         inline void GetColourFast(Colour *, int, int);
  701.  
  702.    FUNCTION
  703.         Inlined version of GetColour(). No error checking is done.
  704.  
  705.    INPUTS
  706.         colour - Pointer to memory where the obtained colour can be stored
  707.         x, y - BitMap coordinates from where to obtain the colour
  708.  
  709.    RESULTS
  710.         None
  711.  
  712.    ERRORS SET
  713.         None
  714.  
  715.    BUGS
  716.         None
  717.  
  718.    SEE ALSO
  719.         GetColour(), GetRedFast(), GetGreenFast(), GetBlueFast(),
  720.         SetColourFast()
  721.  
  722.  
  723. BitMap24/GetRedFast                                       BitMap24/GetRedFast
  724.  
  725.    NAME
  726.         GetRedFast - Obtain the red component at a point in the bitmap,
  727.                      inlined
  728.  
  729.    SYNOPSIS
  730.         result = GetRedFast(x, y)
  731.  
  732.         inline UBYTE GetRedFast(int, int);
  733.  
  734.    FUNCTION
  735.         Inlined version of GetRed(). No error checking is done.
  736.  
  737.    INPUTS
  738.         x, y - BitMap coordinates from where to obtain the colour
  739.  
  740.    RESULTS
  741.         result - Red component at the given coordinate
  742.  
  743.    ERRORS SET
  744.         None
  745.  
  746.    BUGS
  747.         None
  748.  
  749.    SEE ALSO
  750.         GetRed(), GetGreenFast(), GetBlueFast(), GetColourFast()
  751.  
  752.  
  753. BitMap24/GetGreenFast                                   BitMap24/GetGreenFast
  754.  
  755.    NAME
  756.         GetGreenFast - Obtain the green component at a point in the bitmap,
  757.                        inlined
  758.  
  759.    SYNOPSIS
  760.         result = GetGreenFast(x, y)
  761.  
  762.         inline UBYTE GetGreenFast(int, int);
  763.  
  764.    FUNCTION
  765.         Inlined version of GetGreen(). No error checking is done.
  766.  
  767.    INPUTS
  768.         x, y - BitMap coordinates from where to obtain the colour
  769.  
  770.    RESULTS
  771.         result - Green component at the given coordinate
  772.  
  773.    ERRORS SET
  774.         None
  775.  
  776.    BUGS
  777.         None
  778.  
  779.    SEE ALSO
  780.         GetGreen(), GetRedFast(), GetBlueFast(), GetColourFast()
  781.  
  782.  
  783. BitMap24/GetBlueFast                                     BitMap24/GetBlueFast
  784.  
  785.    NAME
  786.         GetBlueFast - Obtain the blue component at a point in the bitmap,
  787.                       inlined
  788.  
  789.    SYNOPSIS
  790.         result = GetBlueFast(x, y)
  791.  
  792.         UBYTE GetBlueFast(int, int);
  793.  
  794.    FUNCTION
  795.         Inlined version of GetBlue(). No error checking is done.
  796.  
  797.    INPUTS
  798.         x, y - BitMap coordinates from where to obtain the colour
  799.  
  800.    RESULTS
  801.         result - Blue component at the given coordinate
  802.  
  803.    ERRORS SET
  804.         None
  805.  
  806.    BUGS
  807.         None
  808.  
  809.    SEE ALSO
  810.         GetBlue(), GetRedFast(), GetGreenFast(), GetColourFast()
  811.  
  812.  
  813. BitMap24/SetColourFast                                 BitMap24/SetColourFast
  814.  
  815.    NAME
  816.         SetColourFast - Set the colour at a position in the bitmap, inlined
  817.  
  818.    SYNOPSIS
  819.         SetColourFast(r, g, b, x, y)
  820.  
  821.         void SetColourFast(UBYTE, UBYTE, UBYTE, int, int);
  822.  
  823.         SetColourFast(colour, x, y)
  824.  
  825.         void SetColourFast(const Colour &, int, int);
  826.  
  827.    FUNCTION
  828.         Inlined version of SetColour(). No error checking is done.
  829.  
  830.    INPUTS
  831.         r, g, b - Colour to set
  832.         colour - Colour to set
  833.         x, y - BitMap coordinates where to colour is to be set
  834.  
  835.    RESULTS
  836.         None
  837.  
  838.    ERRORS SET
  839.         None
  840.  
  841.    BUGS
  842.         None
  843.  
  844.    SEE ALSO
  845.         SetColour(), SetRedFast(), SetGreenFast(), SetBlueFast()
  846.  
  847.  
  848. BitMap24/WriteBitMap                                     BitMap24/WriteBitMap
  849.  
  850.    NAME
  851.         WriteBitMap - Write the bitmap to a 24 bit ILBM IFF file
  852.  
  853.    SYNOPSIS
  854.         WriteBitMap(filename)
  855.  
  856.         void WriteBitMap(char *);
  857.  
  858.    FUNCTION
  859.         The bitmap is written to a new 24 bit IFF ILBM file. This uses the
  860.         IFFParse library, and isn't particularly fast.
  861.  
  862.    INPUTS
  863.         filename - Name of the new file to write to
  864.  
  865.    RESULTS
  866.         None
  867.  
  868.    ERRORS SET
  869.         If the IFF handle failed to allocate, BITMAP24_ERROR_ALLOCFAILURE
  870.         will be set. If the file failed to open for writing, the error code
  871.         BITMAP24_ERROR_FILEOPEN is set.
  872.  
  873.    BUGS
  874.         There is no error checking while writing to a file.
  875.  
  876.    SEE ALSO
  877.         ReadBitMap()
  878.  
  879.  
  880. BitMap24/ReadBitMap                                       BitMap24/ReadBitMap
  881.  
  882.    NAME
  883.         ReadBitMap - Read bitmap from a 24 bit ILBM IFF file
  884.  
  885.    SYNOPSIS
  886.         ReadBitMap(filename)
  887.  
  888.         void ReadBitMap(char *);
  889.  
  890.    FUNCTION
  891.         The bitmap is read from an existing 24 bit IFF ILBM file. This uses
  892.         the IFFParse library, and isn't particularly fast.
  893.         Any bitmap data already present in the class instance will be
  894.         deleted. The size of the bitmap will also be reset to match the
  895.         bitmap in the file.
  896.         Both compressed and uncompressed 24 bit ILBM IFF files are supported.
  897.  
  898.    INPUTS
  899.         filename - Name of the file from which to read bitmap data
  900.  
  901.    RESULTS
  902.         None
  903.  
  904.    ERRORS SET
  905.         If the IFF handle failed to allocate, BITMAP24_ERROR_ALLOCFAILURE
  906.         will be set. If the file failed to open for reading, the error code
  907.         BITMAP24_ERROR_FILEOPEN is set. If something went wrong while setting
  908.         up the parser, BITMAP24_ERROR_PREPARSE is set. If an error occured
  909.         during parsing, BITMAP24_ERROR_PARSE is indicated. If the file
  910.         appears not to be a 24 bit ILBM IFF file, the error is set to
  911.         BITMAP24_ERROR_FILEFORMAT. As the bitmap internal to the class
  912.         instance is reallocated, you can also expect BITMAP24_ERROR_NOBITMAP.
  913.  
  914.    BUGS
  915.         None
  916.  
  917.    SEE ALSO
  918.         WriteBitMap()
  919.  
  920.  
  921. BitMap24/GetBitMap                                         BitMap24/GetBitMap
  922.  
  923.    NAME
  924.         GetBitMap - Get a pointer to the bitmap data, inlined
  925.  
  926.    SYNOPSIS
  927.         result = GetBitMap()
  928.  
  929.         inline UBYTE *GetBitMap(void);
  930.  
  931.    FUNCTION
  932.         If for some reason you really need to have access to the raw bitmap
  933.         data, this will get you a pointer to it. Use the GetWidth() and
  934.         GetHeight() functions (or the inlined versions) to get the size of
  935.         the bitmap array.
  936.         The bitmap is constructed as a row major array of RGB values. The
  937.         useable area of the bitmap is given by GetRealWidth() and
  938.         GetRealHeight() (or the inlined versions).
  939.  
  940.    INPUTS
  941.         None
  942.  
  943.    RESULTS
  944.         result - Pointer to raw bitmap data
  945.  
  946.    ERRORS SET
  947.         None
  948.  
  949.    BUGS
  950.         None
  951.  
  952.    SEE ALSO
  953.  
  954.  
  955. BitMap24/SetSize                                             BitMap24/SetSize
  956.  
  957.    NAME
  958.         SetSize - Set the bitmap size to something else
  959.  
  960.    SYNOPSIS
  961.         SetSize(width, height)
  962.  
  963.         void SetSize(UWORD, UWORD);
  964.  
  965.    FUNCTION
  966.         The current bitmap data is destroyed, and a new bitmap of
  967.         approximately the requested size is allocated. Internally, the bitmap
  968.         will be enlarged to a multiple of 16 in width. The bitmap will be
  969.         zeroed.
  970.  
  971.    INPUTS
  972.         width - Requested bitmap width
  973.         height - Requested bitmap height
  974.  
  975.    RESULTS
  976.         None
  977.  
  978.    ERRORS SET
  979.         If the new bitmap failed to allocate, BITMAP24_ERROR_NOBITMAP will be
  980.         set. Note that if this occurs, your old bitmap data will be gone.
  981.  
  982.    BUGS
  983.         None
  984.  
  985.    SEE ALSO
  986.  
  987.  
  988. BitMap24/BoundsCheck                                     BitMap24/BoundsCheck
  989.  
  990.    NAME
  991.         BoundsCheck - Check if coordinates are within the bitmap
  992.  
  993.    SYNOPSIS
  994.         result = BoundsCheck(x, y)
  995.  
  996.         BOOL BoundsCheck(int, int);
  997.  
  998.    FUNCTION
  999.         The given coordinates are compared with the bitmap size. If the
  1000.         coordinates fall within the drawable area of the bitmap (as defined
  1001.         by the Get{Width|Height}[Fast]() methods), the call will succeed.
  1002.  
  1003.    INPUTS
  1004.         x, y - Coordinate to check
  1005.  
  1006.    RESULTS
  1007.         result - TRUE if coordinate is within the bitmap bounds, FALSE
  1008.                  otherwise
  1009.  
  1010.    ERRORS SET
  1011.         If the coordinate is outside the bounds of the bitmap, the error
  1012.         BITMAP24_ERROR_OUTOFBOUNDS is set.
  1013.  
  1014.    BUGS
  1015.         None
  1016.  
  1017.    SEE ALSO
  1018.  
  1019.